﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>添加控制器和模板</title>
    <script type="text/javascript" src="../../../Content/highlighter/scripts/shCore.js"></script>
    <script type="text/javascript" src="../../../Content/highlighter/scripts/shBrushJScript.js"></script>
    <script type="text/javascript" src="../../../Content/highlighter/scripts/shBrushCSharp.js"></script>
    <script type="text/javascript" src="../../../Content/highlighter/scripts/shBrushXml.js"></script>
    <link type="text/css" rel="stylesheet" href="../../../Content/highlighter/styles/shCore.css" />
    <link type="text/css" rel="stylesheet" href="../../../Content/highlighter/styles/shCoreEclipse.css" />
    <script type="text/javascript">SyntaxHighlighter.all();</script>
</head>
<body>
    <h3>添加控制器</h3>
    <p>
        1.在Controller文件夹上右击->添加->新建项...<br/>
        <img src="../../../Content/images/rumen/20171123130448.png"/><br/>
        2.Visual C#->NFinalController->[输入控制器名称]->添加<br/>
        <img src="../../../Content/images/rumen/20171123130955.png" /><br/>
    </p>
    <pre class="brush:csharp;">
    using System;
    using System.Collections.Generic;
    using System.Text;
    using NFinal;

    namespace NFinalWeb3.Controllers
    {
        public class Index1Controller : BaseController
        {
            public ActionResult Index()
            {
                return null;
            }
        }
    }
    </pre>
</body>
</html>